package cn.kgc.mcartoon.enums;

/**
 * @Description 漫画分类枚举
 * @Date 2019-09-20 10:53
 * @Author Liujx
 * Version 1.0
 **/
public enum  ClassifyEnum {

    THEME(1, "题材"), PROGRESS(2, "进度"), AREAS(3, "地区"), FANS(4, "受众"), COST(5, "收费"), LETTER(6, "字母");

    private ClassifyEnum(Integer code ,String msg){
        this.code = code;
        this.msg = msg;
    }

    private Integer code;

    private String msg;

    public static ClassifyEnum getByCode(Integer code) {
        if (code == null) {
            return null;
        }
        for (ClassifyEnum e : ClassifyEnum.values()) {
            if (code.equals(e.code)) {
                return e;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
